home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / AIncludes / Appearance.a < prev    next >
Encoding:
Text File  |  1998-02-12  |  18.0 KB  |  589 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Appearance.a
  3. ;
  4. ;    Contains:    Appearance Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    Appearance 1.0.2
  7. ;                Release:    Universal Interfaces 3.1
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__APPEARANCE__') = 'UNDEFINED' THEN
  19. __APPEARANCE__ SET 1
  20.  
  21.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  22.     include 'MacTypes.a'
  23.     ENDIF
  24.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  25.     include 'Quickdraw.a'
  26.     ENDIF
  27.     IF &TYPE('__TEXTEDIT__') = 'UNDEFINED' THEN
  28.     include 'TextEdit.a'
  29.     ENDIF
  30.     IF &TYPE('__QDOFFSCREEN__') = 'UNDEFINED' THEN
  31.     include 'QDOffscreen.a'
  32.     ENDIF
  33.  
  34. ; ——————————————————————————————————————————————————————————————————————————————————
  35. ;  Appearance Manager constants, etc.                                                
  36. ; ——————————————————————————————————————————————————————————————————————————————————
  37.  
  38.                                                             ; Appearance Trap Number 
  39. _AppearanceDispatch                EQU        $AA74
  40. ;  Gestalt selector and values for the Appearance Manager 
  41.  
  42. gestaltAppearanceAttr            EQU        'appr'
  43. gestaltAppearanceExists            EQU        0
  44. gestaltAppearanceCompatMode        EQU        1
  45. ;  Gestalt selector for determining Appearance Manager version     
  46. ;  If this selector does not exist, but gestaltAppearanceAttr    
  47. ;  does, it indicates that the 1.0 version is installed. This    
  48. ;  gestalt returns a BCD number representing the version of the    
  49. ;  Appearance Manager that is currently running, e.g. 0x0101 for
  50. ;  version 1.0.1.                                                
  51.  
  52. gestaltAppearanceVersion        EQU        'apvr'
  53. ;  Appearance Manager Apple Events (1.0.1 and later) 
  54.  
  55. kAppearanceEventClass            EQU        'appr'                ; Event Class 
  56. kAEThemeSwitch                    EQU        'thme'                ; Event ID's: Theme Switched 
  57. ;  Appearance Manager Error Codes 
  58.  
  59. appearanceBadBrushIndexErr        EQU        -30560                ; pattern index invalid 
  60. appearanceProcessRegisteredErr    EQU        -30561
  61. appearanceProcessNotRegisteredErr EQU    -30562
  62. appearanceBadTextColorIndexErr    EQU        -30563
  63. appearanceThemeHasNoAccents        EQU        -30564
  64. appearanceBadCursorIndexErr        EQU        -30565
  65.  
  66. kThemeActiveDialogBackgroundBrush EQU    1                    ; Dialogs 
  67. kThemeInactiveDialogBackgroundBrush EQU    2                    ; Dialogs 
  68. kThemeActiveAlertBackgroundBrush EQU    3
  69. kThemeInactiveAlertBackgroundBrush EQU    4
  70. kThemeActiveModelessDialogBackgroundBrush EQU 5
  71. kThemeInactiveModelessDialogBackgroundBrush EQU 6
  72. kThemeActiveUtilityWindowBackgroundBrush EQU 7                ; Miscellaneous 
  73. kThemeInactiveUtilityWindowBackgroundBrush EQU 8            ; Miscellaneous 
  74. kThemeListViewSortColumnBackgroundBrush EQU 9                ; Finder 
  75. kThemeListViewBackgroundBrush    EQU        10
  76. kThemeIconLabelBackgroundBrush    EQU        11
  77. kThemeListViewSeparatorBrush    EQU        12
  78. kThemeChasingArrowsBrush        EQU        13
  79. kThemeDragHiliteBrush            EQU        14
  80. kThemeDocumentWindowBackgroundBrush EQU    15
  81. kThemeFinderWindowBackgroundBrush EQU    16
  82. ; typedef SInt16                         ThemeBrush
  83.  
  84.  
  85. kThemeActiveDialogTextColor        EQU        1                    ; Dialogs 
  86. kThemeInactiveDialogTextColor    EQU        2
  87. kThemeActiveAlertTextColor        EQU        3
  88. kThemeInactiveAlertTextColor    EQU        4
  89. kThemeActiveModelessDialogTextColor EQU    5
  90. kThemeInactiveModelessDialogTextColor EQU 6
  91. kThemeActiveWindowHeaderTextColor EQU    7                    ; Primitives 
  92. kThemeInactiveWindowHeaderTextColor EQU    8
  93. kThemeActivePlacardTextColor    EQU        9                    ; Primitives 
  94. kThemeInactivePlacardTextColor    EQU        10
  95. kThemePressedPlacardTextColor    EQU        11
  96. kThemeActivePushButtonTextColor    EQU        12                    ; Primitives 
  97. kThemeInactivePushButtonTextColor EQU    13
  98. kThemePressedPushButtonTextColor EQU    14
  99. kThemeActiveBevelButtonTextColor EQU    15                    ; Primitives 
  100. kThemeInactiveBevelButtonTextColor EQU    16
  101. kThemePressedBevelButtonTextColor EQU    17
  102. kThemeActivePopupButtonTextColor EQU    18                    ; Primitives 
  103. kThemeInactivePopupButtonTextColor EQU    19
  104. kThemePressedPopupButtonTextColor EQU    20
  105. kThemeIconLabelTextColor        EQU        21                    ; Finder 
  106. kThemeListViewTextColor            EQU        22
  107. ;  Text Colors available in Appearance 1.0.1 or later 
  108.  
  109. kThemeActiveDocumentWindowTitleTextColor EQU 23
  110. kThemeInactiveDocumentWindowTitleTextColor EQU 24
  111. kThemeActiveMovableModalWindowTitleTextColor EQU 25
  112. kThemeInactiveMovableModalWindowTitleTextColor EQU 26
  113. kThemeActiveUtilityWindowTitleTextColor EQU 27
  114. kThemeInactiveUtilityWindowTitleTextColor EQU 28
  115. kThemeActivePopupWindowTitleColor EQU    29
  116. kThemeInactivePopupWindowTitleColor EQU    30
  117. kThemeActiveRootMenuTextColor    EQU        31
  118. kThemeSelectedRootMenuTextColor    EQU        32
  119. kThemeDisabledRootMenuTextColor    EQU        33
  120. kThemeActiveMenuItemTextColor    EQU        34
  121. kThemeSelectedMenuItemTextColor    EQU        35
  122. kThemeDisabledMenuItemTextColor    EQU        36
  123. kThemeActivePopupLabelTextColor    EQU        37
  124. kThemeInactivePopupLabelTextColor EQU    38
  125. ; typedef SInt16                         ThemeTextColor
  126.  
  127. ;  States to draw primitives: disabled, active, and pressed (hilited) 
  128.  
  129. kThemeStateDisabled                EQU        0
  130. kThemeStateActive                EQU        1
  131. kThemeStatePressed                EQU        2
  132. ; typedef UInt32                         ThemeDrawState
  133.  
  134. ; ——————————————————————————————————————————————————————————————————————————————————
  135. ;  Theme menu bar drawing states                                                    
  136. ; ——————————————————————————————————————————————————————————————————————————————————
  137.  
  138. kThemeMenuBarNormal                EQU        0
  139. kThemeMenuBarSelected            EQU        1
  140. ; typedef SInt16                         ThemeMenuBarState
  141.  
  142. ;  attributes 
  143.  
  144. kThemeMenuSquareMenuBar            EQU        $01
  145. ; ——————————————————————————————————————————————————————————————————————————————————
  146. ;  Theme menu drawing states                                                        
  147. ; ——————————————————————————————————————————————————————————————————————————————————
  148.  
  149. kThemeMenuActive                EQU        0
  150. kThemeMenuSelected                EQU        1
  151. kThemeMenuDisabled                EQU        3
  152. ; typedef SInt16                         ThemeMenuState
  153.  
  154.  
  155. kThemeMenuTypePullDown            EQU        0
  156. kThemeMenuTypePopUp                EQU        1
  157. kThemeMenuTypeHierarchical        EQU        2
  158. ; typedef SInt16                         ThemeMenuType
  159.  
  160.  
  161. kThemeMenuItemPlain                EQU        0
  162. kThemeMenuItemHierarchical        EQU        1
  163. kThemeMenuItemScrollUpArrow        EQU        2
  164. kThemeMenuItemScrollDownArrow    EQU        3
  165. ; typedef SInt16                         ThemeMenuItemType
  166.  
  167. ; ——————————————————————————————————————————————————————————————————————————————————
  168. ;  Menu Drawing callbacks                                                            
  169. ; ——————————————————————————————————————————————————————————————————————————————————
  170.  
  171.  
  172. ; ——————————————————————————————————————————————————————————————————————————————————
  173. ;     Appearance Manager APIs                                                            
  174. ; ——————————————————————————————————————————————————————————————————————————————————
  175. ;  Registering Appearance-Savvy Applications 
  176. ;
  177. ; pascal OSStatus RegisterAppearanceClient(void)
  178. ;
  179.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  180.         Macro
  181.         _RegisterAppearanceClient
  182.             move.w              #$0015,D0
  183.             dc.w                $AA74
  184.         EndM
  185.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  186.         IMPORT_CFM_FUNCTION RegisterAppearanceClient
  187.     ENDIF
  188.  
  189. ;
  190. ; pascal OSStatus UnregisterAppearanceClient(void)
  191. ;
  192.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  193.         Macro
  194.         _UnregisterAppearanceClient
  195.             move.w              #$0016,D0
  196.             dc.w                $AA74
  197.         EndM
  198.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  199.         IMPORT_CFM_FUNCTION UnregisterAppearanceClient
  200.     ENDIF
  201.  
  202. ; *****************************************************************************
  203. ;    NOTES ON THEME BRUSHES
  204. ;    Theme brushes can be either colors or patterns, depending on the theme.
  205. ;    Because of this, you should be prepared to handle the case where a brush
  206. ;    is a pattern and save and restore the pnPixPat and bkPixPat fields of
  207. ;    your GrafPorts when saving the fore and back colors. Also, since patterns
  208. ;    in bkPixPat override the background color of the window, you should use
  209. ;    BackPat to set your background pattern to a normal white pattern. This
  210. ;    will ensure that you can use RGBBackColor to set your back color to white,
  211. ;    call EraseRect and get the expected results.
  212. ;****************************************************************************
  213.  
  214.  
  215. ;
  216. ; pascal OSStatus SetThemePen(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice)
  217. ;
  218.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  219.         Macro
  220.         _SetThemePen
  221.             move.w              #$0001,D0
  222.             dc.w                $AA74
  223.         EndM
  224.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  225.         IMPORT_CFM_FUNCTION SetThemePen
  226.     ENDIF
  227.  
  228. ;
  229. ; pascal OSStatus SetThemeBackground(ThemeBrush inBrush, SInt16 inDepth, Boolean inIsColorDevice)
  230. ;
  231.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  232.         Macro
  233.         _SetThemeBackground
  234.             move.w              #$0002,D0
  235.             dc.w                $AA74
  236.         EndM
  237.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  238.         IMPORT_CFM_FUNCTION SetThemeBackground
  239.     ENDIF
  240.  
  241. ;
  242. ; pascal OSStatus SetThemeTextColor(ThemeTextColor inColor, SInt16 inDepth, Boolean inIsColorDevice)
  243. ;
  244.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  245.         Macro
  246.         _SetThemeTextColor
  247.             move.w              #$0003,D0
  248.             dc.w                $AA74
  249.         EndM
  250.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  251.         IMPORT_CFM_FUNCTION SetThemeTextColor
  252.     ENDIF
  253.  
  254. ;
  255. ; pascal OSStatus SetThemeWindowBackground(WindowPtr inWindow, ThemeBrush inBrush, Boolean inUpdate)
  256. ;
  257.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  258.         Macro
  259.         _SetThemeWindowBackground
  260.             move.w              #$0004,D0
  261.             dc.w                $AA74
  262.         EndM
  263.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  264.         IMPORT_CFM_FUNCTION SetThemeWindowBackground
  265.     ENDIF
  266.  
  267. ;  Window Placards, Headers and Frames 
  268. ;
  269. ; pascal OSStatus DrawThemeWindowHeader(const Rect *inRect, ThemeDrawState inState)
  270. ;
  271.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  272.         Macro
  273.         _DrawThemeWindowHeader
  274.             move.w              #$0005,D0
  275.             dc.w                $AA74
  276.         EndM
  277.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  278.         IMPORT_CFM_FUNCTION DrawThemeWindowHeader
  279.     ENDIF
  280.  
  281. ;
  282. ; pascal OSStatus DrawThemeWindowListViewHeader(const Rect *inRect, ThemeDrawState inState)
  283. ;
  284.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  285.         Macro
  286.         _DrawThemeWindowListViewHeader
  287.             move.w              #$0006,D0
  288.             dc.w                $AA74
  289.         EndM
  290.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  291.         IMPORT_CFM_FUNCTION DrawThemeWindowListViewHeader
  292.     ENDIF
  293.  
  294. ;
  295. ; pascal OSStatus DrawThemePlacard(const Rect *inRect, ThemeDrawState inState)
  296. ;
  297.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  298.         Macro
  299.         _DrawThemePlacard
  300.             move.w              #$0007,D0
  301.             dc.w                $AA74
  302.         EndM
  303.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  304.         IMPORT_CFM_FUNCTION DrawThemePlacard
  305.     ENDIF
  306.  
  307. ;
  308. ; pascal OSStatus DrawThemeEditTextFrame(const Rect *inRect, ThemeDrawState inState)
  309. ;
  310.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  311.         Macro
  312.         _DrawThemeEditTextFrame
  313.             move.w              #$0009,D0
  314.             dc.w                $AA74
  315.         EndM
  316.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  317.         IMPORT_CFM_FUNCTION DrawThemeEditTextFrame
  318.     ENDIF
  319.  
  320. ;
  321. ; pascal OSStatus DrawThemeListBoxFrame(const Rect *inRect, ThemeDrawState inState)
  322. ;
  323.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  324.         Macro
  325.         _DrawThemeListBoxFrame
  326.             move.w              #$000A,D0
  327.             dc.w                $AA74
  328.         EndM
  329.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  330.         IMPORT_CFM_FUNCTION DrawThemeListBoxFrame
  331.     ENDIF
  332.  
  333. ;  Keyboard Focus Drawing 
  334. ;
  335. ; pascal OSStatus DrawThemeFocusRect(const Rect *inRect, Boolean inHasFocus)
  336. ;
  337.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  338.         Macro
  339.         _DrawThemeFocusRect
  340.             move.w              #$000B,D0
  341.             dc.w                $AA74
  342.         EndM
  343.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  344.         IMPORT_CFM_FUNCTION DrawThemeFocusRect
  345.     ENDIF
  346.  
  347. ;  Dialog Group Boxes and Separators 
  348. ;
  349. ; pascal OSStatus DrawThemePrimaryGroup(const Rect *inRect, ThemeDrawState inState)
  350. ;
  351.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  352.         Macro
  353.         _DrawThemePrimaryGroup
  354.             move.w              #$000C,D0
  355.             dc.w                $AA74
  356.         EndM
  357.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  358.         IMPORT_CFM_FUNCTION DrawThemePrimaryGroup
  359.     ENDIF
  360.  
  361. ;
  362. ; pascal OSStatus DrawThemeSecondaryGroup(const Rect *inRect, ThemeDrawState inState)
  363. ;
  364.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  365.         Macro
  366.         _DrawThemeSecondaryGroup
  367.             move.w              #$000D,D0
  368.             dc.w                $AA74
  369.         EndM
  370.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  371.         IMPORT_CFM_FUNCTION DrawThemeSecondaryGroup
  372.     ENDIF
  373.  
  374. ;
  375. ; pascal OSStatus DrawThemeSeparator(const Rect *inRect, ThemeDrawState inState)
  376. ;
  377.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  378.         Macro
  379.         _DrawThemeSeparator
  380.             move.w              #$000E,D0
  381.             dc.w                $AA74
  382.         EndM
  383.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  384.         IMPORT_CFM_FUNCTION DrawThemeSeparator
  385.     ENDIF
  386.  
  387. ;  -------------------- BEGIN APPEARANCE 1.0.1 -------------------------------------
  388. ;  The following Appearance Manager APIs are only available 
  389. ;  in Appearance 1.0.1 or later                             
  390. ;
  391. ; pascal OSStatus DrawThemeModelessDialogFrame(const Rect *inRect, ThemeDrawState inState)
  392. ;
  393.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  394.         Macro
  395.         _DrawThemeModelessDialogFrame
  396.             move.w              #$0008,D0
  397.             dc.w                $AA74
  398.         EndM
  399.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  400.         IMPORT_CFM_FUNCTION DrawThemeModelessDialogFrame
  401.     ENDIF
  402.  
  403. ;
  404. ; pascal OSStatus DrawThemeGenericWell(const Rect *inRect, ThemeDrawState inState, Boolean inFillCenter)
  405. ;
  406.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  407.         Macro
  408.         _DrawThemeGenericWell
  409.             move.w              #$0022,D0
  410.             dc.w                $AA74
  411.         EndM
  412.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  413.         IMPORT_CFM_FUNCTION DrawThemeGenericWell
  414.     ENDIF
  415.  
  416. ;
  417. ; pascal OSStatus DrawThemeFocusRegion(RgnHandle inRegion, Boolean inHasFocus)
  418. ;
  419.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  420.         Macro
  421.         _DrawThemeFocusRegion
  422.             move.w              #$0023,D0
  423.             dc.w                $AA74
  424.         EndM
  425.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  426.         IMPORT_CFM_FUNCTION DrawThemeFocusRegion
  427.     ENDIF
  428.  
  429. ;
  430. ; pascal Boolean IsThemeInColor(SInt16 inDepth, Boolean inIsColorDevice)
  431. ;
  432.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  433.         Macro
  434.         _IsThemeInColor
  435.             move.w              #$0024,D0
  436.             dc.w                $AA74
  437.         EndM
  438.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  439.         IMPORT_CFM_FUNCTION IsThemeInColor
  440.     ENDIF
  441.  
  442. ;  IMPORTANT: GetThemeAccentColors will only work in the platinum theme. Any other theme will 
  443. ;  most likely return an error 
  444. ;
  445. ; pascal OSStatus GetThemeAccentColors(CTabHandle *outColors)
  446. ;
  447.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  448.         Macro
  449.         _GetThemeAccentColors
  450.             move.w              #$0025,D0
  451.             dc.w                $AA74
  452.         EndM
  453.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  454.         IMPORT_CFM_FUNCTION GetThemeAccentColors
  455.     ENDIF
  456.  
  457. ;
  458. ; pascal OSStatus DrawThemeMenuBarBackground(const Rect *inBounds, ThemeMenuBarState inState, UInt32 inAttributes)
  459. ;
  460.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  461.         Macro
  462.         _DrawThemeMenuBarBackground
  463.             move.w              #$0018,D0
  464.             dc.w                $AA74
  465.         EndM
  466.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  467.         IMPORT_CFM_FUNCTION DrawThemeMenuBarBackground
  468.     ENDIF
  469.  
  470. ;
  471. ; pascal OSStatus DrawThemeMenuTitle(const Rect *inMenuBarRect, const Rect *inTitleRect, ThemeMenuState inState, UInt32 inAttributes, MenuTitleDrawingUPP inTitleProc, UInt32 inTitleData)
  472. ;
  473.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  474.         Macro
  475.         _DrawThemeMenuTitle
  476.             move.w              #$0019,D0
  477.             dc.w                $AA74
  478.         EndM
  479.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  480.         IMPORT_CFM_FUNCTION DrawThemeMenuTitle
  481.     ENDIF
  482.  
  483. ;
  484. ; pascal OSStatus GetThemeMenuBarHeight(SInt16 *outHeight)
  485. ;
  486.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  487.         Macro
  488.         _GetThemeMenuBarHeight
  489.             move.w              #$001A,D0
  490.             dc.w                $AA74
  491.         EndM
  492.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  493.         IMPORT_CFM_FUNCTION GetThemeMenuBarHeight
  494.     ENDIF
  495.  
  496. ;
  497. ; pascal OSStatus DrawThemeMenuBackground(const Rect *inMenuRect, ThemeMenuType inMenuType)
  498. ;
  499.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  500.         Macro
  501.         _DrawThemeMenuBackground
  502.             move.w              #$001B,D0
  503.             dc.w                $AA74
  504.         EndM
  505.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  506.         IMPORT_CFM_FUNCTION DrawThemeMenuBackground
  507.     ENDIF
  508.  
  509. ;
  510. ; pascal OSStatus GetThemeMenuBackgroundRegion(const Rect *inMenuRect, ThemeMenuType menuType, RgnHandle region)
  511. ;
  512.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  513.         Macro
  514.         _GetThemeMenuBackgroundRegion
  515.             move.w              #$001C,D0
  516.             dc.w                $AA74
  517.         EndM
  518.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  519.         IMPORT_CFM_FUNCTION GetThemeMenuBackgroundRegion
  520.     ENDIF
  521.  
  522. ;
  523. ; pascal OSStatus DrawThemeMenuItem(const Rect *inMenuRect, const Rect *inItemRect, SInt16 inVirtualMenuTop, SInt16 inVirtualMenuBottom, ThemeMenuState inState, ThemeMenuItemType inItemType, MenuItemDrawingUPP inDrawProc, UInt32 inUserData)
  524. ;
  525.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  526.         Macro
  527.         _DrawThemeMenuItem
  528.             move.w              #$001D,D0
  529.             dc.w                $AA74
  530.         EndM
  531.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  532.         IMPORT_CFM_FUNCTION DrawThemeMenuItem
  533.     ENDIF
  534.  
  535. ;
  536. ; pascal OSStatus DrawThemeMenuSeparator(const Rect *inItemRect)
  537. ;
  538.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  539.         Macro
  540.         _DrawThemeMenuSeparator
  541.             move.w              #$001E,D0
  542.             dc.w                $AA74
  543.         EndM
  544.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  545.         IMPORT_CFM_FUNCTION DrawThemeMenuSeparator
  546.     ENDIF
  547.  
  548. ;
  549. ; pascal OSStatus GetThemeMenuSeparatorHeight(SInt16 *outHeight)
  550. ;
  551.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  552.         Macro
  553.         _GetThemeMenuSeparatorHeight
  554.             move.w              #$001F,D0
  555.             dc.w                $AA74
  556.         EndM
  557.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  558.         IMPORT_CFM_FUNCTION GetThemeMenuSeparatorHeight
  559.     ENDIF
  560.  
  561. ;
  562. ; pascal OSStatus GetThemeMenuItemExtra(ThemeMenuItemType inItemType, SInt16 *outHeight, SInt16 *outWidth)
  563. ;
  564.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  565.         Macro
  566.         _GetThemeMenuItemExtra
  567.             move.w              #$0020,D0
  568.             dc.w                $AA74
  569.         EndM
  570.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  571.         IMPORT_CFM_FUNCTION GetThemeMenuItemExtra
  572.     ENDIF
  573.  
  574. ;
  575. ; pascal OSStatus GetThemeMenuTitleExtra(SInt16 *outWidth, Boolean inIsSquished)
  576. ;
  577.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  578.         Macro
  579.         _GetThemeMenuTitleExtra
  580.             move.w              #$0021,D0
  581.             dc.w                $AA74
  582.         EndM
  583.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  584.         IMPORT_CFM_FUNCTION GetThemeMenuTitleExtra
  585.     ENDIF
  586.  
  587.     ENDIF ; __APPEARANCE__ 
  588.  
  589.